I am using the following DJGPP package
You can get this C compiler at http://www.delorie.com/djgpp.
In include/signal.h
, add
#ifndef SIGCONT #define SIGCONT 18 /* CGR */ #endifIn
include/mntent.h
, add
#ifndef MOUNTED #define MOUNTED "/etc/mtab" /* CGR */ #endif #ifndef MNTOPT_RO #define MNTOPT_RO "ro" /* CGR */ #endifIn
include/errno.h
, add
#ifndef EOPNOTSUPP #define EOPNOTSUPP 95 /* CGR */ #endif #ifndef ENOTSUPP #define ENOTSUPP 524 /* Operation is not supported CGR */ #endif #ifndef ENOTSUP #define ENOTSUP 524 /* CGR */ #endif #ifndef ECANCELED #define ECANCELED 125 /* CGR */ #endif #ifndef EILSEQ #define EILSEQ 84 /* CGR */ #endifIn
include/fcntl.h
, add
#define O_LARGEFILE 0100000 /* CGR */Add the file
include/stdint.h
typedef unsigned char uint8_t; typedef unsigned short int uint16_t; typedef unsigned int uint32_t; typedef unsigned long long int uint64_t; typedef char int8_t; typedef short int int16_t; typedef int int32_t; typedef long long int int64_t;Add in
include/sys/types.h
:
__DJ_loff_t /* CGR */ #undef __DJ_loff_t /* CGR */ #define __DJ_loff_t /* CGR */Add in
include/sys/djtypes.h
:
#define __DJ_loff_t typedef long long int loff_t; /* CGR */
Get e2fsprogs-1.34.tgz at http://e2fsprogs.sourceforge.net or on TestDisk web page.
cd testdisk tar xvf e2fsprogs-1.34.tgz
Under Dos or Win9x, run
bash ./configure --with-cc=gcc && make libs
Get progsreiserfs-0.3.1-rc8.tar.gz at http://reiserfs.osdn.org.ua/
tar xzf progsreiserfs-*.tar.gz
bash ./configure --disable-nls && make
Get ntfsprogs-1.8.2.tar.gz from http://linux-ntfs.sf.net/
tar xzf ntfsprogs-1.8.2.tar.gz cd ntfsprogs-1.8.2
bash ./configure CC=gcc && make libs
Source code is included in the TestDisk download (along with a DOS executable and DPMI server program) from
the CGSecurity Website's TestDisk Home page:
http://www.cgsecurity.org/testdisk.html.
To compile TestDisk, run cd src; make dos
.
If you need a small binary for binary distribution, run make dosstatic
.
To compile e2fsprogs, ntfsprogs and progsreiserfs libraries, you can also run ./compile.sh
in TestDisk directory but you need to download the libraries first.
TestDisk is a true 32-bit program (compiled under DJGPP), so a DPMI server program (cwsdpmi.exe) is included in the download which allows TestDisk to run under 16-bit DOS. If you want to work under real (16-bit) DOS, you'll need to have a DPMI server running; to do that, get: csdpmi*b.zip and simply place the executable (cwsdpmi.exe) in your bin directory (which must be in the PATH).
TestDisk home: http://www.cgsecurity.org/testdisk.html.
Christophe GRENIER grenier@cgsecurity.org